﻿using Cheng;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 概率型数值
/// </summary>
public class ProbabilityNumeric
{
    /// <summary>
    /// 概率的次数
    /// </summary>
    public int Times { get; private set; }
    public int Trigger { get; private set; }
    /// <summary>
    /// 当前的概率
    /// </summary>
    public int currentProbability;

    public ProbabilityNumeric(int Probability)
    {
        currentProbability = Probability;
    }

    public bool Probability()
    {
        //var dtProbability = GameEntry.DataTable.GetDataTable<UGFExtensions.DRProbability>();
        //UGFExtensions.DRProbability drProbability = dtProbability.GetDataRow(v => v.SurfaceP == currentProbability);
        //int rand = GameFramework.Utility.Random.GetRandom(10000);
        //bool value= rand < drProbability.ActualC*Mathf.Max(Times+1,1);
        //Trigger = value ? Times + 1 : 0;

        //Times = value ? 0 : Times + 1;

        //return value;
        return true;
    }
}
